package day04;

/**
 * for 循环
 */
public class ForDemo {
    public static void main(String[] args) {
        for (int num =1;num<=9;num++){
            System.out.println(num+"*9="+num*9);
        }
        for (int num =1;num<=9;num+=2){
            System.out.println(num+"*9="+num*9);
        }
        for (int num =9;num>=1;num--){
            System.out.println(num+"*9="+num*9);
        }
        for (int times=0;times<5;times++){
            System.out.println("书籍是人类进步的阶梯");
        }



        int nun=0;
        for(int i=1;i<=100;i++){
            nun=nun+i;
        }
        System.out.println(nun);
        /**
         * nun=0
         * i=1 nun=1
         * i=2 nun=1+2
         * i=3 nun=1+2+3
         * ................
         * i=99 nun=1+2+3+...+99
         * i=100 nun =1+2+3+...+99+100
         * i=101 false
         *
         * **/



        /**
         * num=1 x s
         * num=2 x s
         * num=3 x s
         * num=4 x s
         * num=5 x s
         * num=6 x s
         * num=7 x s
         * num=8 x s
         * num=9 x s
         * num=10 d j
         *
         * **/
        /**
         * num=1 x s
         * num=3 x s
         * num=5 x s
         * num=7 x s
         * num=9 x s
         * num=11 d j
         * **/
    }
}
